package co.edu.unal.unlbs.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the Hora_asignatura database table.
 * 
 */
@Embeddable
public class Hora_asignaturaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="cod_hora_asignatura")
	private int codHoraAsignatura;

	@Column(name="cod_asignatura")
	private String codAsignatura;

    public Hora_asignaturaPK() {
    }
	public int getCodHoraAsignatura() {
		return this.codHoraAsignatura;
	}
	public void setCodHoraAsignatura(int codHoraAsignatura) {
		this.codHoraAsignatura = codHoraAsignatura;
	}
	public String getCodAsignatura() {
		return this.codAsignatura;
	}
	public void setCodAsignatura(String codAsignatura) {
		this.codAsignatura = codAsignatura;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof Hora_asignaturaPK)) {
			return false;
		}
		Hora_asignaturaPK castOther = (Hora_asignaturaPK)other;
		return 
			(this.codHoraAsignatura == castOther.codHoraAsignatura)
			&& this.codAsignatura.equals(castOther.codAsignatura);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.codHoraAsignatura;
		hash = hash * prime + this.codAsignatura.hashCode();
		
		return hash;
    }
}